﻿Public Class _Default
    Inherits System.Web.UI.Page

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load

    End Sub

    Protected Sub btncalculate_Click(ByVal sender As Object, ByVal e As EventArgs) Handles btncalculate.Click
        Dim int1 As Single 'declaring variable 1
        Dim int2 As Single ' declaring variable 2

        int1 = CSng(txtint1.Text) 'storing the values in textbox txtint1 in variable int1
        int2 = CSng(txtint2.Text) 'storing the values in textbox txtint2 in variable int2


        Dim answer As Single 'declaring variable for the answer.
        answer = int1 + int2 'the calculation which adds the value in int1 with int2 and stores the answer in the answer variable

        lblsum.Text = CSng(answer) 'the label lblsum will show the value stored in the answer variable
    End Sub
End Class